/* USER CODE BEGIN Header */
/**
  ******************************************************************************
  * @file           : main.h
  * @brief          : Header for main.c file.
  *                   This file contains the common defines of the application.
  ******************************************************************************
  * @attention
  *
  * <h2><center>&copy; Copyright (c) 2022 STMicroelectronics.
  * All rights reserved.</center></h2>
  *
  * This software component is licensed by ST under Ultimate Liberty license
  * SLA0044, the "License"; You may not use this file except in compliance with
  * the License. You may obtain a copy of the License at:
  *                             www.st.com/SLA0044
  *
  ******************************************************************************
  */
/* USER CODE END Header */

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __MAIN_H
#define __MAIN_H

#ifdef __cplusplus
extern "C" {
#endif

/* Includes ------------------------------------------------------------------*/
#include "stm32f1xx_hal.h"

/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */

/* USER CODE END Includes */

/* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET */

/* USER CODE END ET */

/* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC */

/* USER CODE END EC */

/* Exported macro ------------------------------------------------------------*/
/* USER CODE BEGIN EM */

/* USER CODE END EM */

/* Exported functions prototypes ---------------------------------------------*/
void Error_Handler(void);

/* USER CODE BEGIN EFP */

/* USER CODE END EFP */

/* Private defines -----------------------------------------------------------*/
#define Buzzer_Pin GPIO_PIN_13
#define Buzzer_GPIO_Port GPIOC
#define DT_Seg0_Pin GPIO_PIN_0
#define DT_Seg0_GPIO_Port GPIOF
#define DT_Seg1_Pin GPIO_PIN_1
#define DT_Seg1_GPIO_Port GPIOF
#define DT_Seg2_Pin GPIO_PIN_2
#define DT_Seg2_GPIO_Port GPIOF
#define DT_Seg3_Pin GPIO_PIN_3
#define DT_Seg3_GPIO_Port GPIOF
#define DT_Seg4_Pin GPIO_PIN_4
#define DT_Seg4_GPIO_Port GPIOF
#define DT_Seg5_Pin GPIO_PIN_5
#define DT_Seg5_GPIO_Port GPIOF
#define DT_Seg6_Pin GPIO_PIN_6
#define DT_Seg6_GPIO_Port GPIOF
#define DT_Seg7_Pin GPIO_PIN_7
#define DT_Seg7_GPIO_Port GPIOF
#define JS_Key_Pin GPIO_PIN_2
#define JS_Key_GPIO_Port GPIOC
#define NSS_Pin GPIO_PIN_0
#define NSS_GPIO_Port GPIOA
#define SLR_SCL_Pin GPIO_PIN_4
#define SLR_SCL_GPIO_Port GPIOC
#define SLR_SDA_Pin GPIO_PIN_5
#define SLR_SDA_GPIO_Port GPIOC
#define EncoderX_Pin GPIO_PIN_0
#define EncoderX_GPIO_Port GPIOB
#define EncoderX_EXTI_IRQn EXTI0_IRQn
#define EncoderY_Pin GPIO_PIN_1
#define EncoderY_GPIO_Port GPIOB
#define EncoderY_EXTI_IRQn EXTI1_IRQn
#define D0_Pin GPIO_PIN_0
#define D0_GPIO_Port GPIOG
#define D1_Pin GPIO_PIN_1
#define D1_GPIO_Port GPIOG
#define MOTORX_EN_Pin GPIO_PIN_11
#define MOTORX_EN_GPIO_Port GPIOB
#define MOTORX_DIR_Pin GPIO_PIN_12
#define MOTORX_DIR_GPIO_Port GPIOB
#define LimitSW_Right_Pin GPIO_PIN_13
#define LimitSW_Right_GPIO_Port GPIOB
#define LimitSW_Right_EXTI_IRQn EXTI15_10_IRQn
#define LimitSW_Left_Pin GPIO_PIN_14
#define LimitSW_Left_GPIO_Port GPIOB
#define LimitSW_Left_EXTI_IRQn EXTI15_10_IRQn
#define Row0_Pin GPIO_PIN_8
#define Row0_GPIO_Port GPIOD
#define Row1_Pin GPIO_PIN_9
#define Row1_GPIO_Port GPIOD
#define Row2_Pin GPIO_PIN_10
#define Row2_GPIO_Port GPIOD
#define Row3_Pin GPIO_PIN_11
#define Row3_GPIO_Port GPIOD
#define Column0_Pin GPIO_PIN_12
#define Column0_GPIO_Port GPIOD
#define Column1_Pin GPIO_PIN_13
#define Column1_GPIO_Port GPIOD
#define Column2_Pin GPIO_PIN_14
#define Column2_GPIO_Port GPIOD
#define Column3_Pin GPIO_PIN_15
#define Column3_GPIO_Port GPIOD
#define D2_Pin GPIO_PIN_2
#define D2_GPIO_Port GPIOG
#define D3_Pin GPIO_PIN_3
#define D3_GPIO_Port GPIOG
#define D4_Pin GPIO_PIN_4
#define D4_GPIO_Port GPIOG
#define D5_Pin GPIO_PIN_5
#define D5_GPIO_Port GPIOG
#define D6_Pin GPIO_PIN_6
#define D6_GPIO_Port GPIOG
#define D7_Pin GPIO_PIN_7
#define D7_GPIO_Port GPIOG
#define LCD_RS_Pin GPIO_PIN_8
#define LCD_RS_GPIO_Port GPIOG
#define LED1_Pin GPIO_PIN_7
#define LED1_GPIO_Port GPIOC
#define LED2_Pin GPIO_PIN_9
#define LED2_GPIO_Port GPIOC
#define RS485_DE_Pin GPIO_PIN_8
#define RS485_DE_GPIO_Port GPIOA
#define LCD_RW_Pin GPIO_PIN_9
#define LCD_RW_GPIO_Port GPIOG
#define LCD_EN_Pin GPIO_PIN_10
#define LCD_EN_GPIO_Port GPIOG
#define LCD_RST_Pin GPIO_PIN_11
#define LCD_RST_GPIO_Port GPIOG
#define SW1_Pin GPIO_PIN_12
#define SW1_GPIO_Port GPIOG
#define SW2_Pin GPIO_PIN_13
#define SW2_GPIO_Port GPIOG
#define SW3_Pin GPIO_PIN_14
#define SW3_GPIO_Port GPIOG
#define SW4_Pin GPIO_PIN_15
#define SW4_GPIO_Port GPIOG
#define LED0_Pin GPIO_PIN_5
#define LED0_GPIO_Port GPIOB
/* USER CODE BEGIN Private defines */

/* USER CODE END Private defines */

#ifdef __cplusplus
}
#endif

#endif /* __MAIN_H */

/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
